package com.nd.mobile.study.view;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.widget.TabHost;

import com.nd.mobile.study.R;
import com.nd.mobile.study.common.BaseActivity;
import com.nd.mobile.study.view.adapter.SimpleTabsFragmentAdapter;

public class StudyRecordCatalogActivity extends BaseActivity {

//	private static final String[] LABELS = {"视频记录","作业记录"};
//	private static final String[] FRAGMENTNAMES = {VideoRecordFragment.class.getName(), VideoRecordFragment.class.getName()};
	private static final String[] LABELS = {"视频记录"};
	private static final String[] FRAGMENTNAMES = {VideoRecordFragment.class.getName()};
	
	private TabHost							mTabHost;
	private ViewPager						mViewPager;
	private SimpleTabsFragmentAdapter		mTabsAdapter;

	
	@Override
	protected void onBaseCreate(Bundle savedInstanceState) {
		setContentView(R.layout.pager_tab);
	}

	@Override
	protected void initViews() {
		super.initHeader();
		mHeaderTitleTv.setText(R.string.tv_app_studyrecord);
	}

	@Override
	protected void setFieldValues() {
		super.setFieldValues();
		mTabHost = (TabHost) findViewById(android.R.id.tabhost);
		mTabHost.setup();
		mViewPager = (ViewPager) findViewById(R.id.pager);
		mTabsAdapter = new SimpleTabsFragmentAdapter(this, mTabHost, mViewPager);
		
	}

	@Override
	protected void onAfterCreate(Bundle savedInstanceStat) {
		mTabsAdapter.setTabs(LABELS, FRAGMENTNAMES);
	}
}